(define (make-interval a b)
    (cons a b)
)
(define (lower-bound z)
    (car z)
)
(define (upper-bound z)
    (cdr z)
)

(define (print-interval x)
    (newline)
    (display "[")
    (display (lower-bound x))
    (display ",")
    (display (upper-bound x))
    (display "]")
)

(define (mul-interval x y)
    (let (
        (p1 (* (lower-bound x) (lower-bound y)))
        (p2 (* (lower-bound x) (upper-bound y)))
        (p3 (* (upper-bound x) (lower-bound y)))
        (p4 (* (upeer-bound x) (upper-bound y)))        
        )
        (make-intervaal 
            (min p1 p2 p3 p4)
            (max p1 p2 p3 p4)
        )
    )
)
(define (div-interval x y)
    (let (
        (lb (lower-bound y))
    )
    (if (< lb 0)
        (error "y lower-bound is < 0" y )
        (mul-interval x
            (make-interval 
                (/ 1.0 (upper-bound y))
                (/ 1.0 (lower-bound y))
            )
        )
    )
    )
)

(define interval_1 
    (make-interval 2 3)
)

(define interval_2 
    (make-interval -1 2)
)
(print-interval (div-interval interval_1 interval_2))
(exit)